$(document).ready(function(){
		$("#operator-select-object").click(function(){
			if($(this).attr("checked")) {
				$("input[type='checkbox'][name*='operator_']").each(function(n){
					if (!$(this).attr("checked")) {
						 $(this).attr("checked","checked");
					}
				});
			} else {
				$("input[type='checkbox'][name*='operator_']").each(function(n){
					if ($(this).attr("checked")) {
						 $(this).attr("checked",false);
					}
				});
			}
		});
		$("#operator-new-add").click(function(){
			var submitUrl = "operator!showAdd.action";
			document.location.href =  submitUrl;
		});
		$("#operator-batch-del").click(function(){
			var ids = new Array();
			var i = 0;
			$("input[type='checkbox'][name*='operator_']").each(function(n){
				if ($(this).attr("checked")) {
					ids[i++]=$(this).attr("value");
				}
			});
			alert(ids.toString());
			if (ids.length == 0) {
				alert("请选择要删除的记录");
				return;
			}
			var formStr = "<form action='operator!del.action' method='post' id='operatorDelForm'><input type='hidden' name='ids' value='"+ids.toString()+"'/></form>";
			$("operatorDelDiv").empty();
			$("#operatorDelDiv").append(formStr);
			$("#operatorDelForm").submit();
		});
});
function operatorOneDel(id) {alert(id);
/*var summitUrl = "";
$.post(url,{id:id}, function(data){
	if (data == "emailEmpty") {
		alert();
	}
})*/
};
